The Export6000 Program
The Export6000 program allows to export data from a DBM6000 database to a text file. When it starts, the program reads the options in the Export6000.ini file that should be in the same directory. The possible error messages are displayed in a DOS window and are saved in the file Export6000.log.
The options of the Export6000.ini file :
| Section | Entry | Description |
| DB | DSN | Name of the DBM6000 data source. |
| DB | Login | Login to connect oneself to the data source. |
| DB | Password | Password to connect oneself to the data source. Be careful, the password must be encrypted, so you have to copy out the text from the INI file of the DBM6000 or from the DB6 file of the Client 6000. These files take place in the installation directory. |
| Output | File |
Full name of the file that is to be generated (by default Export.txt). Be careful, the program replaces the file if it does already exist. In the generated file the fields are separated by ";". |
| Output | AppendDate |
To add information to the file name (optional) : the year (YYYY ou YY), the month (MM), the date (DD), the hour (hh), the minutes (mm). Exemple : |
| SQL | Select |
The SQL query to run. Exemple : |
| SQL | Where |
The WHERE clause, to filter the recording that must be exported (optional). Be careful, you mustn't type the word "WHERE". This field can contain the following macros for fields of Date/Hour type : - #TODAY(FieldName)# Exemples : |
| SQL | OrderBy |
The ORDER BY clause, to sort the recording that must be exported (optional). Exemple : |
Help to format dates :
| Desired format | SQL Server | Oracle |
| YYYYMMDD | CONVERT(VARCHAR(8), FieldName, 112) | TO_CHAR(EvDateTime, 'YYYYMMDD') |
| HHMMSS | CONVERT(VARCHAR(8), EvDateTime, 8) (but with ":" between the fields) |
TO_CHAR(EvDateTime, 'HH24MISS') |
Example of Export6000.ini file :
In this example (Oracle database), the authorized access events of the
previous week are exported in the file C:\Export\ExportYYMMDD.csv. Four fields
are created : Date, Hour, User Name (Text1) and Access name (Text2).
[DB]
DSN=<YourDSN>
Login=<YourLogin>
Password=<YourCryptedPassword>
[Output]
File=C:\Export\Export.csv
AppendDate=YYMMDD
[SQL]
Select=SELECT TO_CHAR(EvDateTime, 'YYYYMMDD'), TO_CHAR(EvDateTime,
'HH24MISS'), Text1, Text2 FROM Events
Where=EvType IN (160, 162) AND #LASTWEEK(EvDateTime)#
OrderBy=EvDateTime